var serviceHttp = 'http://inmycars.ihengtian.top/';
// var serviceHttp = 'http://192.168.1.240:8999/';

var myTest = angular.module('test', []);

myTest.controller('testController', function ($http, $scope, $location, $q, $interval) {
    //document.cookie = "JSESSIONID=6509BE029F71847F4322F7492C8D0E46";
    //$scope.c_user = c_user;


    var option = {
            title:{
                    text:'dsfdsdf',
                    show:true,
                    textAlign:'center'
                },
            color: ['#3398DB'],
            tooltip : {
                trigger: 'axis',
                axisPointer : {            // 坐标轴指示器，坐标轴触发有效
                    type : 'shadow'        // 默认为直线，可选为：'line' | 'shadow'
                }
            },
            grid: {
                left: '3%',
                right: '4%',
                bottom: '3%',
                containLabel: true
            },
            xAxis : [
                {
                    type : 'category',
                    data : ['Mon', 'Tue'],
                    axisTick: {
                        alignWithLabel: true
                    }
                }
            ],
            yAxis : [
                {
                    type : 'value'
                }
            ],
            series : [
                {
                    name:'直接访问',
                    type:'bar',
                    barWidth: '60%',
                    data:[10, 52]
                }
            ]
        };

        creatZhuChart('bartest',option);
        creatZhuChart('bartestother',option);

//                   var renderTimer = setTimeout(renderChart, 2000);
//                   function renderChart() {
//                        creatZhuChart('bartest',option);
//
//                   }

//        $http.get(serviceHttp + 'api/rest/device/current/data?deviceId=' + 101).success(function (res) {
//                   $scope.inspectData = res.data;
//                   $scope.inspects = res.data.list;
//                   console.log($scope.inspects);
//                   var renderTimer = setTimeout(renderChart, 200);
//                   function renderChart() {
//                        creatZhuChart('bartest',option);
//
//                   }
//
//            });

});